home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_root.gamestopped != true)
- {
- _root.albero._rotation += step * (_root.bendrate / 100);
- limit = (5 + _root.bendrate / 10) / _root.bendrate * _root.bendrate;
- if((_root.albero._rotation > limit || _root.albero._rotation < limit * -1) && changed == false)
- {
- step *= -1;
- changed = true;
- }
- else
- {
- changed = false;
- }
- if(_root.bendrate == 0 && _rotation != 0)
- {
- if(_rotation > 0)
- {
- _rotation = _rotation - 1;
- }
- if(_rotation < 0)
- {
- _rotation = _rotation + 1;
- }
- }
- if(_root.bendrate == 0 && _rotation == 0)
- {
- step = 5;
- }
- if(_root.timeleft < 0)
- {
- _root.gotoAndPlay("gameover");
- _root.gamestopped = true;
- }
- }
- faccia = distinguiFaccia(_root.bendrate);
- if(faccia != oldfaccia)
- {
- _root.albero.scimmia.gotoAndStop(faccia);
- oldfaccia = faccia;
- }
- if(faccia == 3 || faccia == 4)
- {
- if(_root.nutController.acceso == false)
- {
- _root.nutController.acceso = true;
- }
- }
- if(faccia == 1 || faccia == 2)
- {
- _root.nutController.acceso = false;
- }
- }
-